<template>
    <div class="index">
        <TopTitle Title="demo"></TopTitle>
        <div class="tit">
            <InputForm propsFieldTitle='电话' propsFieldIconIsshow='true' :isShow='true'></InputForm>
        </div>
        <div class="axios-demo">
            <ul>
                <li v-for="(item,index) in ceshiData" :key="index" @click="toPage(item.url)">
                    <h2>{{item.title}}</h2>
                    <span>{{item.ptime}}</span>
                    <h4>{{item.digest}}</h4>
                    <img :src="item.imgsrc" :alt="item.source">
                </li>
            </ul>
        </div>
    </div>
</template>
<script>
import TopTitle from '../topTitle/topTitle1'
import InputForm from '../inputForm/inputForm'
import Axios from 'axios'
import qs from 'qs'
import Vue from 'vue'
Vue.prototype.$qs = qs
// import {getDemo} from '../../api/demo'
export default {
    name:'demo',
    components:{
        TopTitle,
        InputForm
    },
    data(){
        return{
            ceshiData:[]
        }
    },
    mounted(){
        var _this=this
        this.$axios.get('touch/reconstruct/article/list/BBM54PGAwangning/0-10.html')
        .then(function(response){
            // console.log(response.data)
            let jsonDataa = response.data.split('(')[1].split(')')[0]

            _this.ceshiData=JSON.parse(jsonDataa).BBM54PGAwangning
            console.log(_this.ceshiData)
        })
        .catch(err=>{
            console.log(err)
        })
    },
    methods:{
        // 跳转页面
        toPage(page){
            // window.location.href=page
        }
    }
}
</script>
<style scoped>
.tit{
    height:auto;
    display:block;
}
.axios-demo{
    position: absolute
}
</style>
